{layout name="/base"}
    <div class="row">
      <div class="col-lg-12">
        <h1>营地管理 <small>营地信息列表</small></h1>
        <ol class="breadcrumb">
          <li><a href="/index"><i class="fa fa-dashboard"></i> 管理首页</a></li>
          <li class="active"><i class="fa fa-table"></i> 营地信息列表</li>
        </ol>
        <div class="alert alert-success alert-dismissable">
          <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
          	这里可以审核营地信息 
        </div>
      </div>
    </div>
    <!-- /.row -->
    <div class="row">
      <div class="col-lg-12">
        <form class="form-horizontal" role="form" action="/camps" method="get">
           <div class="form-group col-lg-2"  style="margin-right:10px;">
            <label for="">审核状态</label>
            <select class="form-control" name="status">
              <option value="">全部</option>
              <option value="1">审核通过</option>
              <option value="-99">未通过审核</option>
            </select>
          </div>
          <div class="form-group col-lg-2" style="margin-right:10px;">
            <label for="">选择分公司</label>
            <select class="form-control" name="branch_id" id="branch">
              <option value="">全部</option>
              {foreach $filiales as $key=>$value}
              {if($key == input('get.branch_id'))}
              <option selected value="{$key}">{$value}</option>
              {else/}
              <option  value="{$key}">{$value}</option>
              {/if}
              {/foreach}
            </select>
          </div>
          <div class="form-group col-lg-2"  style="margin-right:10px;">
            <label for="">请选择搜索条件</label>
            <select class="form-control" name="searchfield">
              <option value="number">营地编号</option>
              <option value="name">营地名称</option>
            </select>
          </div>
           <div class="form-group col-lg-3 input-group"  style="margin-right:10px;">  
            <label for="">请输入关键字</label>
            {if (input('get.keyword'))}
            <input class="form-control" type="text"  value="{:input('get.keyword')}" name="keyword">
            {else /}
            <input class="form-control" type="text"  placeholder="请输入营地信息搜索" name="keyword">
            {/if}
            <label for="">&nbsp;</label>
            <span class="input-group-btn">
              <button class="btn btn-default" type="submit">搜索</button>
            </span>
          </div>
        </form>
      </div>
        <div class="table-responsive">
          <table class="table table-bordered table-hover table-striped tablesorter">
            <thead>
              <tr>
                <th><div class="checker"><span><input type="checkbox" name=""></span></div></th>
                <th>营地编号</th>
                <th>营地名称</th>
                <th>营地类型</th>
                <th>营地星级</th>
                <th>泊位数量</th>
                <th>所属分公司</th>
                <th>地址</th>
                <th>电话</th>
                <th>出租基数</th>
                <th>营地旅行币基数</th>
                <th>操作</th>
              </tr>
            </thead>
            <tbody>
            {foreach $list as $v}
              <tr>
                <td><div class="checker"><span><input type="checkbox" name="ids[]" value="" ></span></div></td>
                <td>{$v.number}</td>
                <td><a href="###">{$v.name}</a></td>
                <td>{$v.typeInfo.name}</td>
                <td>{$v.gradeInfo.name}</td>
                <td>{$v.count}</td>
                <td>{$v.filiales.name}</td>
                <td>{$v->getAddress($v.country)} {$v->getAddress($v.province)} {$v->getAddress($v.city)}</td>
                <td>{$v.tel}</td>
                <td>{$v.rent_money_base}</td>
                <td>{$v.travel_money_base}</td>
                <td>
                	{if $v.status===-99}
                	<a href="/camps/{$v.id}/edit">审核</a>
                	{elseif($v.status===1)}
                	<a href="/camps/{$v.id}/edit">审核通过，可点击修改</a> | 
                	<a href="/camps/setcamp/id/{$v.id}">设置热门时间段</a>
                	{/if}
                </td>
              </tr>
            {/foreach}
            </tbody>
          </table>
        </div>
      </div>
      <div class="col-sm-12">
      </div>
    </div>
    <!-- /.row -->
